gtk-demo: Adapt textview example for stipple removal
authorBenjamin Otte <otte@redhat.com>
Wed, 21 Jul 2010 01:16:29 +0000 (03:16 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 10 Aug 2010 19:02:28 +0000 (21:02 +0200)
demos/gtk-demo/textview.c

index f17f880916b6fd113e0c2fb461ed9c76748c9ae8..cfac7fd02368610393a3bc6fa86c908045e0444e 100644 (file)
 
 static void easter_egg_callback (GtkWidget *button, gpointer data);
 
-#define gray50_width 2
-#define gray50_height 2
-static char gray50_bits[] = {
-  0x02, 0x01
-};
-
 static void
 create_tags (GtkTextBuffer *buffer)
 {
-  GdkBitmap *stipple;
-
   /* Create a bunch of tags. Note that it's also possible to
    * create tags with gtk_text_tag_new() then add them to the
    * tag table for the buffer, gtk_text_buffer_create_tag() is
@@ -74,18 +66,6 @@ create_tags (GtkTextBuffer *buffer)
   gtk_text_buffer_create_tag (buffer, "red_background",
                              "background", "red", NULL);
 
-  stipple = gdk_bitmap_create_from_data (NULL,
-                                        gray50_bits, gray50_width,
-                                        gray50_height);
-  
-  gtk_text_buffer_create_tag (buffer, "background_stipple",
-                             "background_stipple", stipple, NULL);
-
-  gtk_text_buffer_create_tag (buffer, "foreground_stipple",
-                             "foreground_stipple", stipple, NULL);
-
-  g_object_unref (stipple);
-
   gtk_text_buffer_create_tag (buffer, "big_gap_before_line",
                              "pixels_above_lines", 30, NULL);
 
@@ -227,17 +207,9 @@ insert_text (GtkTextBuffer *buffer)
                                            "red_background", NULL);
   gtk_text_buffer_insert (buffer, &iter, " or even ", -1);  
   gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
-                                           "a stippled red background", -1,
-                                           "red_background",
-                                           "background_stipple",
-                                           NULL);
-
-  gtk_text_buffer_insert (buffer, &iter, " or ", -1);  
-  gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
-                                           "a stippled blue foreground on solid red background", -1,
+                                           "a blue foreground on red background", -1,
                                            "blue_foreground",
                                            "red_background",
-                                           "foreground_stipple",
                                            NULL);
   gtk_text_buffer_insert (buffer, &iter, " (select that to read it) can be used.\n\n", -1);